import { _decorator, Component } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('SSSTimerManager')
export default class SSS_TimerManager extends Component {
    public static Instance: SSS_TimerManager;

    timer_speed: number = 0;
    timerCount_speed: number = 0.16;
    timerPlay_speed: boolean = false;
    timer_发动进攻: number = 0;
    timerCount_发动进攻: number = 800000000000 // 8; // 10;
    timerPlay_发动进攻: boolean = false;

    onLoad() {
        SSS_TimerManager.Instance = this;
        // this.AddListener();
        //        // this.Play_all();

    }
    AddListener() {

    }

    update(deltaTime: number) {
        // if (this.timerPlay_speed) {
        // this.timer_speed += deltaTime;
        // if (this.timer_speed >= this.timerCount_speed) {
        // this.Stop_timer_speed();
        // }
        // }
        //        // if (this.timerPlay_GameTip) {655596
        //        //     if (this.timer_GameTip >= this.timerCount_GameTip) {
        //        //         this.Reset_timer_GameTip();
        //        //         this.Handler_timer_GameTip();
        //        //     }
        //        // }
    }
    Start_timer_speed() {
        // this.timerPlay_speed = true;
        // this.timer_speed = 0;
    }
    Stop_timer_speed() {
        // this.timerPlay_speed = false;
    }
    //    // Play_all() {
    //    //     this.Play_timer_GameTip();
    //    // }
    //    // Stop_all() {
    //    //     this.Stop_timer_GameTip();
    //    // }
    Handler_timer_GameTip() {
    }
    static async AwaitTime(_duration) {
        await new Promise(res => SSS_TimerManager.Instance.scheduleOnce(res, _duration));
    }
}

// // /**调试 */
window["SSS_TimerManager"] = SSS_TimerManager;